package io.jee.medusa.orm.pager.output;

import java.util.List;

import io.jee.medusa.orm.pager.InputPager;

public class OutputPager<E> extends InputPager {

	private static final long serialVersionUID = 1L;
	private List<E> items;
	/**
	 * 总记录数
	 */
	private long total;
	/**
	 * 总页数
	 */
	private int pageSize;

	public List<E> getItems() {
		return items;
	}

	public void setItems(List<E> items) {
		this.items = items;
	}

	public long getTotal() {
		return total;
	}

	public void setTotal(long total) {
		this.total = total;
	}

	public int getPageSize() {
		pageSize = (int) ((total+super.getItemSize()-1)/super.getItemSize());
		return pageSize;
	}

}
